﻿@model YogaStudio.Data.Domain.Product

@{
    ViewBag.Title = "Delete";
}

<div class="main">
    <div class="content">
        <div class="section group">
            <div class="col span_2_of_3">
                <div class="contact-form">
                    <p>
                        @if (TempData["Message"] != null)
                        {
                            <div style="color:green;" id="successMessage">@TempData["Message"]</div>
                            <script>
                                setInterval(function () {
                                    $("#successMessage").fadeOut("slow");
                                }, 1500);
                            </script>
                        }
                    </p>
                    <h3>Are you sure you want to delete product...</h3>
                    <p>Deleting the product can also delete pruchased product by the customer</p>
                    <table class="details">
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.Category.CategoryName)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.Category.CategoryName)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.ProductName)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.ProductName)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.Description)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.Description)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.SearchAttributes)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.SearchAttributes)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.ImageUrl)
                            </td>

                            <td>
                                <img src="@Url.Content(Model.ImageUrl ?? "~/Content/Images/DefaultPicture.jpeg")" alt="Image Not Found" height="30" width="30" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.Price)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.Price)
                            </td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DisplayNameFor(model => model.IsAvailable)
                            </td>

                            <td>
                                @Html.DisplayFor(model => model.IsAvailable)
                            </td>
                        </tr>
                    </table>

                    @using (Html.BeginForm())
                    {
                        @Html.AntiForgeryToken()

                        <div class="form-actions no-color">
                            <input type="submit" value="Delete" class="btn btn-default" /> |
                            @Html.ActionLink("Back to List", "Index")
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>
